home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / vbasic / bmpvws.zip / OPENBMP.FRM < prev   
Text File  |  1993-09-21  |  11KB  |  395 lines

  1. VERSION 2.00
  2. Begin Form OpenBitmap 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Bitmap Viewer Control"
  5.    ClientHeight    =   3108
  6.    ClientLeft      =   3108
  7.    ClientTop       =   3852
  8.    ClientWidth     =   5688
  9.    ClipControls    =   0   'False
  10.    Height          =   3480
  11.    Left            =   3084
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   3108
  16.    ScaleWidth      =   5688
  17.    Top             =   3504
  18.    Width           =   5736
  19.    Begin SSCheck SaveSettings 
  20.       Caption         =   "&Save settings on exit"
  21.       Font3D          =   0  'None
  22.       FontBold        =   -1  'True
  23.       FontItalic      =   0   'False
  24.       FontName        =   "MS Sans Serif"
  25.       FontSize        =   6.6
  26.       FontStrikethru  =   0   'False
  27.       FontUnderline   =   0   'False
  28.       ForeColor       =   &H00000000&
  29.       Height          =   252
  30.       Left            =   240
  31.       TabIndex        =   8
  32.       Top             =   2160
  33.       Width           =   2292
  34.    End
  35.    Begin SSCommand AboutBitmap 
  36.       Caption         =   "&About Viewer"
  37.       Font3D          =   3  'Inset w/light shading
  38.       FontBold        =   -1  'True
  39.       FontItalic      =   0   'False
  40.       FontName        =   "MS Sans Serif"
  41.       FontSize        =   6.6
  42.       FontStrikethru  =   0   'False
  43.       FontUnderline   =   0   'False
  44.       ForeColor       =   &H00000000&
  45.       Height          =   372
  46.       Left            =   240
  47.       TabIndex        =   7
  48.       Top             =   600
  49.       Width           =   1812
  50.    End
  51.    Begin SSCommand ExitViewer 
  52.       Caption         =   "E&xit Viewer"
  53.       Font3D          =   3  'Inset w/light shading
  54.       FontBold        =   -1  'True
  55.       FontItalic      =   0   'False
  56.       FontName        =   "MS Sans Serif"
  57.       FontSize        =   6.6
  58.       FontStrikethru  =   0   'False
  59.       FontUnderline   =   0   'False
  60.       ForeColor       =   &H00000000&
  61.       Height          =   372
  62.       Left            =   240
  63.       TabIndex        =   6
  64.       Top             =   1680
  65.       Width           =   1812
  66.    End
  67.    Begin SSCommand Close 
  68.       Caption         =   "&Close"
  69.       Font3D          =   3  'Inset w/light shading
  70.       FontBold        =   -1  'True
  71.       FontItalic      =   0   'False
  72.       FontName        =   "MS Sans Serif"
  73.       FontSize        =   6.6
  74.       FontStrikethru  =   0   'False
  75.       FontUnderline   =   0   'False
  76.       ForeColor       =   &H00000000&
  77.       Height          =   372
  78.       Left            =   240
  79.       TabIndex        =   5
  80.       Top             =   1320
  81.       Width           =   1812
  82.    End
  83.    Begin SSCommand LoadBMP 
  84.       Caption         =   "&Load BMP"
  85.       Font3D          =   3  'Inset w/light shading
  86.       FontBold        =   -1  'True
  87.       FontItalic      =   0   'False
  88.       FontName        =   "MS Sans Serif"
  89.       FontSize        =   6.6
  90.       FontStrikethru  =   0   'False
  91.       FontUnderline   =   0   'False
  92.       ForeColor       =   &H00000000&
  93.       Height          =   372
  94.       Left            =   240
  95.       TabIndex        =   4
  96.       Top             =   960
  97.       Width           =   1812
  98.    End
  99.    Begin SSPanel Panel3D1 
  100.       Align           =   2  'Align Bottom
  101.       Alignment       =   0  'Left Justify - TOP
  102.       BackColor       =   &H00C0C0C0&
  103.       BevelInner      =   2  'Raised
  104.       BevelWidth      =   3
  105.       Caption         =   "Panel3D1"
  106.       FloodShowPct    =   0   'False
  107.       FloodType       =   4  'Bottom To Top
  108.       Font3D          =   0  'None
  109.       ForeColor       =   &H00000000&
  110.       Height          =   3108
  111.       Left            =   0
  112.       RoundedCorners  =   0   'False
  113.       ShadowColor     =   1  'Black
  114.       TabIndex        =   0
  115.       Top             =   0
  116.       Width           =   5688
  117.       Begin SSCheck Aspect 
  118.          Caption         =   "&Maintain aspect ratio"
  119.          Font3D          =   0  'None
  120.          FontBold        =   -1  'True
  121.          FontItalic      =   0   'False
  122.          FontName        =   "MS Sans Serif"
  123.          FontSize        =   6.6
  124.          FontStrikethru  =   0   'False
  125.          FontUnderline   =   0   'False
  126.          ForeColor       =   &H00000000&
  127.          Height          =   252
  128.          Left            =   240
  129.          TabIndex        =   10
  130.          Top             =   2640
  131.          Width           =   2292
  132.       End
  133.       Begin SSCheck OnTop 
  134.          Caption         =   "&Always on top"
  135.          Font3D          =   0  'None
  136.          FontBold        =   -1  'True
  137.          FontItalic      =   0   'False
  138.          FontName        =   "MS Sans Serif"
  139.          FontSize        =   6.6
  140.          FontStrikethru  =   0   'False
  141.          FontUnderline   =   0   'False
  142.          ForeColor       =   &H00000000&
  143.          Height          =   252
  144.          Left            =   240
  145.          TabIndex        =   9
  146.          Top             =   2400
  147.          Width           =   2292
  148.       End
  149.       Begin FileListBox File1 
  150.          BackColor       =   &H00C0C0C0&
  151.          FontBold        =   -1  'True
  152.          FontItalic      =   0   'False
  153.          FontName        =   "MS Sans Serif"
  154.          FontSize        =   6.6
  155.          FontStrikethru  =   0   'False
  156.          FontUnderline   =   0   'False
  157.          ForeColor       =   &H00000000&
  158.          Height          =   2520
  159.          Left            =   3960
  160.          Pattern         =   "*.BMP"
  161.          TabIndex        =   3
  162.          Top             =   240
  163.          Width           =   1452
  164.       End
  165.       Begin DirListBox Dir1 
  166.          BackColor       =   &H00C0C0C0&
  167.          FontBold        =   -1  'True
  168.          FontItalic      =   0   'False
  169.          FontName        =   "MS Sans Serif"
  170.          FontSize        =   6.6
  171.          FontStrikethru  =   0   'False
  172.          FontUnderline   =   0   'False
  173.          ForeColor       =   &H00000000&
  174.          Height          =   1824
  175.          Left            =   2160
  176.          TabIndex        =   2
  177.          Top             =   240
  178.          Width           =   1692
  179.       End
  180.       Begin DriveListBox Drive1 
  181.          BackColor       =   &H00C0C0C0&
  182.          FontBold        =   -1  'True
  183.          FontItalic      =   0   'False
  184.          FontName        =   "MS Sans Serif"
  185.          FontSize        =   6.6
  186.          FontStrikethru  =   0   'False
  187.          FontUnderline   =   0   'False
  188.          ForeColor       =   &H00000000&
  189.          Height          =   252
  190.          Left            =   240
  191.          TabIndex        =   1
  192.          Top             =   240
  193.          Width           =   1812
  194.       End
  195.    End
  196. End
  197.  
  198. Sub AboutBitmap_Click ()
  199.  
  200.     BmpABout.Show 1
  201.     
  202. End Sub
  203.  
  204. Sub Close_Click ()
  205.     
  206.     OpenBitmap.Hide
  207.     If (OnTop = True) Then
  208.         Topmost
  209.     Else
  210.         NotTopMost
  211.     End If
  212.     
  213. End Sub
  214.  
  215. Sub Dir1_Change ()
  216.     
  217.     File1.Path = Dir1.Path
  218.     File1.SetFocus
  219.     If File1.ListCount Then
  220.         File1.ListIndex = 0
  221.         If LoadBMP.Enabled = False Then
  222.             LoadBMP.Enabled = True
  223.         End If
  224.     Else
  225.         LoadBMP.Enabled = False
  226.     End If
  227.  
  228. End Sub
  229.  
  230. Sub Dir1_Click ()
  231.     
  232.     LastChange = DIRSBOXCLICK
  233.  
  234. End Sub
  235.  
  236. Sub Drive1_Change ()
  237.     
  238.     On Error Resume Next
  239.     Dir1.Path = Drive1.Drive
  240.     
  241.     If Err Then
  242.         MsgBox Error$
  243.         Drive1.Drive = Dir1.Path
  244.     End If
  245.  
  246. End Sub
  247.  
  248. Sub ExitViewer_Click ()
  249.     
  250.     If (SaveSettings = True) Then
  251.         SaveINI
  252.     End If
  253.     
  254.     BmpView.Image1.Picture = LoadPicture("")
  255.     Unload OpenBitmap
  256.     Unload BmpABout
  257.     Unload BmpView
  258.     End
  259.  
  260. End Sub
  261.  
  262. Sub File1_Click ()
  263.     
  264.     LastChange = FileFormCLICK
  265.     
  266.     If File1.ListCount Then
  267.         If LoadBMP.Enabled = False Then
  268.             LoadBMP.Enabled = True
  269.         End If
  270.     Else
  271.         LoadBMP.Enabled = False
  272.     End If
  273.  
  274. End Sub
  275.  
  276. Sub File1_DblClick ()
  277.     
  278.     LoadBMP_Click
  279.     
  280. End Sub
  281.  
  282. Sub Form_Load ()
  283.     
  284. '    Dim tmp As Integer
  285. '    Dim Slash As Integer
  286.  
  287.     LoadBMP.Enabled = False
  288.  
  289. '   If (BMPFileName <> "") Then
  290. '       tmp = InStr(BMPFileName, "\")
  291. '       While (tmp)
  292. '           Slash = tmp
  293. '           tmp = InStr(Slash + 1, BMPFileName, "\")
  294. '       Wend
  295. '       Dir1.Path = Left$(BMPFileName, Slash - 1)
  296. '   End If
  297.  
  298. End Sub
  299.  
  300. Sub Form_Unload (Cancel As Integer)
  301.  
  302. End Sub
  303.  
  304. Sub LoadBMP_Click ()
  305.     
  306.     TheNewPath = Dir1.Path
  307.     If Right$(TheNewPath, 1) <> "\" Then
  308.         TheNewPath = TheNewPath + "\"
  309.     End If
  310.     BMPFileName = TheNewPath + OpenBitmap.File1.FileName
  311.     
  312.     ViewAllowResize = False
  313.     ImageLoad
  314.     ViewAllowResize = True
  315.  
  316.     OpenBitmap.Hide
  317.     
  318.     If (OnTop = True) Then
  319.         Topmost
  320.     Else
  321.         NotTopMost
  322.     End If
  323.     
  324. End Sub
  325.  
  326. Sub SaveINI ()
  327.     
  328.     Dim LIN As String
  329.     Dim NoTitle As String
  330.     Dim SaveSet As String
  331.     Dim Always As String
  332.     Dim AspectRatio As String
  333.     Dim INIChan As Integer
  334.  
  335.     On Error GoTo INIERROR
  336.     INIChan% = 1
  337.     
  338.     If (BmpView.Caption = "") Then
  339.         NoTitle = "Yes"
  340.     Else
  341.         NoTitle = "No"
  342.     End If
  343.     If (SaveSettings = True) Then
  344.         SaveSet = "Yes"
  345.     Else
  346.         SaveSet = "No"
  347.     End If
  348.     If (OnTop = True) Then
  349.         Always = "Yes"
  350.     Else
  351.         Always = "No"
  352.     End If
  353.     If (Aspect = True) Then
  354.         AspectRatio = "Yes"
  355.     Else
  356.         AspectRatio = "No"
  357.     End If
  358.  
  359.     Open "C:\WINDOWS\BMPVIEW.INI" For Output As #INIChan%
  360.     Print #INIChan%, "[Current Bitmap]"
  361.     Print #INIChan%, BMPFileName
  362.     Print #INIChan%, "[Top]"
  363.     Print #INIChan%, Str$(BmpView.Top)
  364.     Print #INIChan%, "[Left]"
  365.     Print #INIChan%, Str$(BmpView.Left)
  366.     Print #INIChan%, "[Height]"
  367.     Print #INIChan%, Str$(BmpView.Height)
  368.     Print #INIChan%, "[Width]"
  369.     Print #INIChan%, Str$(BmpView.Width)
  370.     Print #INIChan%, "[No Title]"
  371.     Print #INIChan%, NoTitle
  372.     Print #INIChan%, "[Save Settings]"
  373.     Print #INIChan%, SaveSet
  374.     Print #INIChan%, "[Always on top]"
  375.     Print #INIChan%, Always
  376.     Print #INIChan%, "[Aspect Ratio]"
  377.     Print #INIChan%, AspectRatio
  378.     Close #INIChan%
  379.     Exit Sub
  380.  
  381. INIERROR:
  382.         
  383.     If (Err) Then
  384.         MsgBox "Error saving BMPVIEW.INI in C:\WINDOWS"
  385.         Resume CarryOn
  386.     End If
  387.     
  388. CarryOn:
  389.  
  390.     Form_Unload 0
  391.     End
  392.  
  393. End Sub
  394.  
  395.